home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK2.toast / Development Kits (Disc 2) / QuickTime / Programming Stuff / Documentation / develop articles / develop Issue 14 / Video Digitizing / HackTV & softVdig / README < prev    next >
Encoding:
Text File  |  1993-03-17  |  5.1 KB  |  103 lines  |  [TEXT/ttxt]

  1. This note contains info about the sample code that accompanies the develop Issue 13 article, "Video Digitizing Under QuickTime", by Casey King and Gary Woodcock.
  2.  
  3. There 12 files included in the sample code folder:
  4.  
  5.         HackTV.π                                                Think C project file for the HackTV preview/record application
  6.         HackTV.c                                                 source code for the HackTV preview/record application
  7.         HackTV.π.rsrc                                 resource file for the HackTV preview/record application
  8.         Hack TV                                                    HackTV standalone application
  9.  
  10.         softVdig.π                                             Think C project file for the standalone softvdig component
  11.         softVdig                                                  softvdig component extension
  12.         softVdig.c                                                source code for the softvdig component
  13.         softVdig.h                                                header file for the softvdig component
  14.         softVdig.π.rsrc                                resource file for the softvdig component
  15.  
  16.         HackTVDebug.π                                Think C project file to run HackTV and softvdig linked
  17.         HackTVDebug.π.rsrc                 resource file for this project
  18.         Hack TV Debug                                    standalone application that contains app & component
  19.  
  20. ------------------------------------------------------------------------------
  21.  
  22. There are 2 modes of running this code, linked and standalone.
  23.  
  24. The linked version is the easiest. Simply run the HackTVDebug application or build the HackTVDebug.π project.
  25.  
  26. To run the standalone version, use the Reinstaller II application to install the softVdig (the component extension). You can use Things! to verify that the softVdig is installed and is the default component. Launch HackTV which will find the softVdig component and the frame burning will start.
  27.  
  28. ------------------------------------------------------------------------------
  29. Using the Application
  30.  
  31. Once launched, you should see a monitor window.  The frame number in the Monitor window will be incrementing.
  32.  
  33. You can resize the Monitor window by using the Quarter Size, Half Size, and Full Size menu items from the Monitor menu.
  34.  
  35. HackTV also allows you to access the sequence grabber panel components. Select the Video Settings ... menu item from the Monitor menu. Select the source panel, and adjust the color controls. The controls will move and stick, but you will not notice any change in the monitor window. 
  36.  
  37. To record a movie, select the Record menu item from the Monitor menu. Recording will start immediately. To terminate recording, depress the mouse button inside the Monitor window. A movie, named Hack Movie, will be created and placed on your desktop. You can play this movie with MoviePlayer.
  38.  
  39. ------------------------------------------------------------------------------
  40. Configuring the soft Video Digitzer
  41.  
  42. The softVdig can be reconfigured by modifying the defines in softVdig.h. A few interesting cases are shown below, but feel free to experiment!
  43.  
  44. Case 1
  45. The initial values of these constants looks like:
  46.  
  47. #define        kMaxHorNTSCIn         320
  48. #define        kMaxVerNTSCIn         240
  49. #define        kVerBlank            0
  50. #define        gMaxSoftVdigCount      1
  51. #define        gDoesDepths          0
  52. #define        gDoesPlaythru          false
  53. #define        gHasAuxBuffer          false                                        
  54. #define        gAuxDepth              16                        
  55. #define        gCanAsync             true                
  56. #define        gCanClip              true
  57. #define        gCanScale              true
  58. #define        gCanDMA              true                        
  59. #define        gDMADepths          16 | 8                
  60. #define        gMaxHeight          240
  61. #define        gMaxWidth              320
  62. #define        gMinHeight          119
  63. #define        gMinWidth              159
  64. #define        gDoesFrameRate      false
  65. #define        gVideoTimeScale      2997            
  66. #define        gDoesCompress          false            
  67. #define        gOnlyDoesCompress      false    
  68. #define        gOnlyCompressType      'rpza'
  69.  
  70. This configuration will result in the sequence grabber creating an offscreen area for the softvdig to grab into since the digitizer doesn't support any output device (gDoesDepths = 0). The sequence grabber then copies this data onscreen. The VDGrabOneFrame call is used to tell the softVdig to "grab" another frame (in this case drawVideoFrame).
  71.  
  72. Case 2
  73. Change:
  74. #define        gDoesCompress          true            
  75. #define        gOnlyDoesCompress      true
  76.  
  77. This configuration indicates that the vdig can only provide compressed images. During previewing and recording, the softvdig "draws" the frame to the monitor window at the completion of the compression stage (in vdigCompressOneFrameAsync). So the data that you see on the screen is "compressed". You can even notice a difference in the shade of the data in this mode.
  78.  
  79. Note: In this mode, to see frames on the screen during record, change the code in HackTV.c from:
  80.  
  81.                     result = SGSetChannelUsage (gVideoChannel, seqGrabPreview | seqGrabRecord);
  82. to:
  83.                     result = SGSetChannelUsage (gVideoChannel, seqGrabPreview | seqGrabRecord | seqGrabPlayDuringRecord);
  84.  
  85. Case 3
  86. Change:
  87. #define        gDoesCompress          true            
  88. #define        gOnlyDoesCompress      false
  89.  
  90. This configuration indicates that the vdig can provide both raw image data and compressed data. During previewing, the standard vdigGrabOneFrame is used. While recording, the vdig displays the compressed image to the monitor window.
  91.  
  92. Note: In this mode, to see frames on the screen during record, change the code in HackTV.c from:
  93.  
  94.                     result = SGSetChannelUsage (gVideoChannel, seqGrabPreview | seqGrabRecord);
  95. to:
  96.                     result = SGSetChannelUsage (gVideoChannel, seqGrabPreview | seqGrabRecord | seqGrabPlayDuringRecord);
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.